package com.southwind.config;

import com.alibaba.csp.sentinel.adapter.servlet.callback.WebCallbackManager;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * sentinel配置类
 */
@Configuration
public class SentinelConfiguration {

    /**
     * sentinel 白名单、黑名单配置类
     */
    @PostConstruct
    public void init() {
        WebCallbackManager.setRequestOriginParser(new RequestOriginParserDefinition());
    }
}
